<!DOCTYPE HTML>
<html>
<head>
    <title id="title">【Spring Boot 实战】论坛项目【第一季】 P12 获取用户信息报错</title>
    <head><head>
    <link rel="stylesheet" href="layui/css/bootstrap.min.css">
    <link rel="stylesheet" href="layui/css/bootstrap-theme.min.css">
    <link rel="stylesheet" href="layui/css/community.css">
    <link rel="icon" href="https://www.mawen.co/images/logo.png" type="image/x-icon">
    <script src="layui/js/jquery-3.4.1.min.js"></script>
    <script src="layui/js/bootstrap.min.js" type="application/javascript"></script>
    <script src="layui/js/community.js" type="application/javascript"></script>
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <meta name="google-site-verification" content="QGf2OqDw91EjWtNE07HoLJi0x0G2rIYylk6jn6JEoEQ">
    <!-- Global site tag (gtag.js) - Google Analytics -->
    <script async="" src="static/js/js.js"></script>
    <script>
        window.dataLayer = window.dataLayer || [];
        function gtag(){dataLayer.push(arguments);}
        gtag('js', new Date());


        gtag('config', 'UA-89103576-8');
    </script>

</head><head>
    <link rel="stylesheet" href="layui/css/editormd.min.css">
    <link rel="stylesheet" href="layui/css/editormd.preview.min.css">
    <script src="layui/js/editormd.min.js" type="application/javascript"></script>
    <script src="layui/js/moment.js" type="application/javascript"></script>
    <script src="layui/js/marked.min.js"></script>
    <script src="layui/js/prettify.min.js"></script>
        <script src="http://cdn.staticfile.org/jquery/3.6.0/jquery.min.js"></script>

    </head></head>
    <head><head>
    <link rel="stylesheet" href="layui/css/editormd.min.css">
    <link rel="stylesheet" href="layui/css/editormd.preview.min.css">
    <script src="static/js/editormd.min.js" type="application/javascript"></script>
    <script src="layui/js/moment.js" type="application/javascript"></script>
    <script src="layui/js/marked.min.js"></script>
    <script src="layui/js/prettify.min.js"></script>
</head></head>
</head>
<body>
<div><div>
    <nav class="navbar navbar-default">
        <div class="container-fluid">
            <div class="navbar-header">
                <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1" aria-expanded="false">
                    <span class="sr-only">星论坛</span>
                </button>
                <a class="navbar-brand" href="index.html">星论坛</a>
            </div>

            <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
                <form class="navbar-form navbar-left" action="/" method="get">
                    <div class="form-group">
                        <input type="text" class="form-control" name="search" placeholder="搜索问题">
                    </div>
                    <button type="submit" class="btn btn-default">搜索</button>
                </form>
                <ul class="nav navbar-nav">
                    <script>
                        function clickNav(label) {
                            gtag('event', 'click', {
                                'event_category': 'LINK',
                                'event_label': label,
                                'transport_type': 'NAV'
                            })
                        }
                    </script>
                    <li>
                        <a href="837.html" onclick="clickNav(&quot;\u5DE5\u4F5C 2 \u5E74\u963F\u91CC\u524D\u7AEF\u90FD\u95EE\u4EC0\u4E48\uFF1F&quot;)" target="_blank">工作 2 年阿里前端都问什么？</a>
                    </li>
                </ul>
                <ul class="nav navbar-nav navbar-right">
                    
                    <li><a href="index.html">通知 <span class="badge"></span></a>
                    </li>
                    
                    <li>
                        <a href="#" data-toggle="modal" data-target="#myModal">登录</a>
                    </li>

                </ul>
            </div>
        </div>
    </nav>

    <div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
        <div class="modal-dialog" role="document" style="margin-top: 200px;width: 300px;">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                    <h4 class="modal-title" id="myModalLabel">登录注册</h4>
                </div>
                <div class="modal-body" style="text-align:center">
                    <a href="javascript:;">
                        <img src="static/picture/gitee.png">
                    </a>
                    <a href="javascript:;">
                        <img src="static/picture/github.png">
                    </a>
                </div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
                </div>
            </div>
        </div>
    </div>
</div></div>
<div class="container-fluid main profile">
    <div class="row" id="charu">

        <!--左边主要内容-->
        <div class="col-lg-9 col-md-12 col-sm-12 col-xs-12">
            <!--正文-->
            <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
                <h4 class="question-title" ><span id="title1">【Spring Boot 实战】论坛项目【第一季】 P12 获取用户信息报错</span></h4>
                <span class="text-desc">
                作者：<span id="topicUser">小匠</span> |
                发布时间：<span id="topicTime">2021-01-10 03:26</span> |
                阅读数： <span id="browseCount">1549</span>
            </span>
                <hr class="col-lg-12 col-md-12 col-sm-12 col-xs-12">

                <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12 top-header">
<!--                    <a href="212.html" target="_blank" style="color: #A00;font-weight: bold;">工作 2 年跳槽阿里，面试官会问哪些？</a>-->

                </div>

                <!--内容-->
                <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12" id="question-view">
                    <textarea id="content" style="display:none;">

                    </textarea>
                </div>
                <script type="text/javascript">
                    $(function () {
                        editormd.markdownToHTML("question-view", {});
                    });
                </script>

                
                <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12" style="width: 100%;">
                    <script async="" src="static/js/adsbygoogle.js"></script>
                    <!-- 页尾广告 -->
                    <ins class="adsbygoogle" style="display:block" data-ad-client="ca-pub-9804684553882114" data-ad-slot="4772323686" data-ad-format="auto" data-full-width-responsive="true"></ins>
                    <script>
                        (adsbygoogle = window.adsbygoogle || []).push({});
                    </script>
                </div>

                <!--标签-->
                <hr class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
                <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
                    <span class="question-tag">
                        <a href="javascript:;" class="community-tag" id="biaoqian">java</a>
                    </span>
                    <a  onclick="dianzan()"><span class="glyphicon glyphicon-thumbs-up icon" id="dianzan"></span></a>
                    点赞总数<span id="dianzansum"></span>
                </div>

                <!--编辑-->
                <hr class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
                <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
                    
                </div>
                <hr class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
            </div>

            <!--回复-->
            <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
                <h4>
                    <span>8</span> 个回复
                </h4>
                <hr class="col-lg-12 col-md-12 col-sm-12 col-xs-12 comment-sp">
                <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12 comments">
                    <div class="media">
                        <div class="media-left">
                            <a href="#">
                                <img class="media-object img-rounded" src="static/picture/01abdc8ea9c7441881f156bde6187fc4.png">
                            </a>
                        </div>
                        <div class="media-body" id="comment-body-4109">
                            <h5 class="media-heading">
                                <span>小黑</span>
                            </h5>
                            <div>不知道为什么我也是空的，不仅是name，连id也是空，什么原因啊，在的指点一下</div>
                            <div class="menu">
                                <span class="glyphicon glyphicon-thumbs-up icon"></span>
                                <span data-id="4109" onclick="collapseComments(this)" class="comment-icon">
                                    <span class="glyphicon glyphicon-comment"></span>
                                    <span>0</span>
                                </span>
                                <span class="pull-right">2021-08-19</span>
                            </div>
                            <!--二级评论-->
                            <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12 collapse sub-comments" id="comment-4109">
                                <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
                                    <input type="text" class="form-control" placeholder="评论一下……" id="input-4109">
                                    <button type="button" class="btn btn-success pull-right" onclick="comment(this)" data-id="4109">评论
                                    </button>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12 comments">
                    <div class="media">
                        <div class="media-left">
                            <a href="#">
                                <img class="media-object img-rounded" src="static/picture/7c6484f85fcc46f1b1eb834f6113677a.png">
                            </a>
                        </div>
                        <div class="media-body" id="comment-body-4089">
                            <h5 class="media-heading">
                                <span></span>
                            </h5>
                            <div>经常报错超时呢</div>
                            <div class="menu">
                                <span class="glyphicon glyphicon-thumbs-up icon"></span>
                                <span data-id="4089" onclick="collapseComments(this)" class="comment-icon">
                                    <span class="glyphicon glyphicon-comment"></span>
                                    <span>0</span>
                                </span>
                                <span class="pull-right">2021-08-11</span>
                            </div>
                            <!--二级评论-->
                            <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12 collapse sub-comments" id="comment-4089">
                                <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
                                    <input type="text" class="form-control" placeholder="评论一下……" id="input-4089">
                                    <button type="button" class="btn btn-success pull-right" onclick="comment(this)" data-id="4089">评论
                                    </button>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12 comments">
                    <div class="media">
                        <div class="media-left">
                            <a href="#">
                                <img class="media-object img-rounded" src="static/picture/77d5feec412947a9b1ed6396ee92a42c.png">
                            </a>
                        </div>
                        <div class="media-body" id="comment-body-4072">
                            <h5 class="media-heading">
                                <span>cyz</span>
                            </h5>
                            <div>不知道为什么我也是空的，不仅是name，连id也是空</div>
                            <div class="menu">
                                <span class="glyphicon glyphicon-thumbs-up icon"></span>
                                <span data-id="4072" onclick="collapseComments(this)" class="comment-icon">
                                    <span class="glyphicon glyphicon-comment"></span>
                                    <span>2</span>
                                </span>
                                <span class="pull-right">2021-08-04</span>
                            </div>
                            <!--二级评论-->
                            <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12 collapse sub-comments" id="comment-4072">
                                <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
                                    <input type="text" class="form-control" placeholder="评论一下……" id="input-4072">
                                    <button type="button" class="btn btn-success pull-right" onclick="comment(this)" data-id="4072">评论
                                    </button>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12 comments">
                    <div class="media">
                        <div class="media-left">
                            <a href="#">
                                <img class="media-object img-rounded" src="static/picture/75bf21cfe794406e903ea0a035a991f7.png">
                            </a>
                        </div>
                        <div class="media-body" id="comment-body-3960">
                            <h5 class="media-heading">
                                <span>小马</span>
                            </h5>
                            <div>java.lang.IllegalArgumentException: Unexpected char 0x20 at 13 in header name: Authorization</div>
                            <div class="menu">
                                <span class="glyphicon glyphicon-thumbs-up icon"></span>
                                <span data-id="3960" onclick="collapseComments(this)" class="comment-icon">
                                    <span class="glyphicon glyphicon-comment"></span>
                                    <span>0</span>
                                </span>
                                <span class="pull-right">2021-05-16</span>
                            </div>
                            <!--二级评论-->
                            <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12 collapse sub-comments" id="comment-3960">
                                <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
                                    <input type="text" class="form-control" placeholder="评论一下……" id="input-3960">
                                    <button type="button" class="btn btn-success pull-right" onclick="comment(this)" data-id="3960">评论
                                    </button>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12 comments">
                    <div class="media">
                        <div class="media-left">
                            <a href="#">
                                <img class="media-object img-rounded" src="static/picture/75bf21cfe794406e903ea0a035a991f7.png">
                            </a>
                        </div>
                        <div class="media-body" id="comment-body-3950">
                            <h5 class="media-heading">
                                <span>小马</span>
                            </h5>
                            <div>2021-05-15 13:52:43.461 ERROR 2392 --- [nio-8888-exec-2] o.a.c.c.C.[.[.[/].[dispatcherServlet]    : Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed; nested exception is java.lang.IllegalArgumentException: Unexpected char 0x20 at 13 in header name: Authorization ] with root cause
改了新方法，报3这个错误，up主</div>
                            <div class="menu">
                                <span class="glyphicon glyphicon-thumbs-up icon"></span>
                                <span data-id="3950" onclick="collapseComments(this)" class="comment-icon">
                                    <span class="glyphicon glyphicon-comment"></span>
                                    <span>0</span>
                                </span>
                                <span class="pull-right">2021-05-15</span>
                            </div>
                            <!--二级评论-->
                            <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12 collapse sub-comments" id="comment-3950">
                                <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
                                    <input type="text" class="form-control" placeholder="评论一下……" id="input-3950">
                                    <button type="button" class="btn btn-success pull-right" onclick="comment(this)" data-id="3950">评论
                                    </button>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12 comments">
                    <div class="media">
                        <div class="media-left">
                            <a href="#">
                                <img class="media-object img-rounded" src="static/picture/75bf21cfe794406e903ea0a035a991f7.png">
                            </a>
                        </div>
                        <div class="media-body" id="comment-body-3946">
                            <h5 class="media-heading">
                                <span>小马</span>
                            </h5>
                            <div>为啥我改了新的方法，还是不行，一直返回null，有大佬知道怎么回事吗？急</div>
                            <div class="menu">
                                <span class="glyphicon glyphicon-thumbs-up icon"></span>
                                <span data-id="3946" onclick="collapseComments(this)" class="comment-icon">
                                    <span class="glyphicon glyphicon-comment"></span>
                                    <span>3</span>
                                </span>
                                <span class="pull-right">2021-05-14</span>
                            </div>
                            <!--二级评论-->
                            <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12 collapse sub-comments" id="comment-3946">
                                <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
                                    <input type="text" class="form-control" placeholder="评论一下……" id="input-3946">
                                    <button type="button" class="btn btn-success pull-right" onclick="comment(this)" data-id="3946">评论
                                    </button>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12 comments">
                    <div class="media">
                        <div class="media-left">
                            <a href="#">
                                <img class="media-object img-rounded" src="static/picture/dd63eb7fc2fe47879a915ff03d0ba0cd.png">
                            </a>
                        </div>
                        <div class="media-body" id="comment-body-3864">
                            <h5 class="media-heading">
                                <span>LLIU</span>
                            </h5>
                            <div>java.lang.IllegalArgumentException: Unexpected char 0x0a at 12 in Authorization value: token &quot;en&quot; &gt;

改了之后这是什么问题阿</div>
                            <div class="menu">
                                <span class="glyphicon glyphicon-thumbs-up icon"></span>
                                <span data-id="3864" onclick="collapseComments(this)" class="comment-icon">
                                    <span class="glyphicon glyphicon-comment"></span>
                                    <span>1</span>
                                </span>
                                <span class="pull-right">2021-04-06</span>
                            </div>
                            <!--二级评论-->
                            <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12 collapse sub-comments" id="comment-3864">
                                <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
                                    <input type="text" class="form-control" placeholder="评论一下……" id="input-3864">
                                    <button type="button" class="btn btn-success pull-right" onclick="comment(this)" data-id="3864">评论
                                    </button>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12 comments">
                    <div class="media">
                        <div class="media-left">
                            <a href="#">
                                <img class="media-object img-rounded" src="static/picture/48b958646c64482bb6240231caf754c2.png">
                            </a>
                        </div>
                        <div class="media-body" id="comment-body-3741">
                            <h5 class="media-heading">
                                <span>Alex.</span>
                            </h5>
                            <div>111</div>
                            <div class="menu">
                                <span class="glyphicon glyphicon-thumbs-up icon"></span>
                                <span data-id="3741" onclick="collapseComments(this)" class="comment-icon">
                                    <span class="glyphicon glyphicon-comment"></span>
                                    <span>2</span>
                                </span>
                                <span class="pull-right">2021-01-16</span>
                            </div>
                            <!--二级评论-->
                            <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12 collapse sub-comments" id="comment-3741">
                                <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
                                    <input type="text" class="form-control" placeholder="评论一下……" id="input-3741">
                                    <button type="button" class="btn btn-success pull-right" onclick="comment(this)" data-id="3741">评论
                                    </button>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>

            <!--回复输入框-->
            <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
                <h4>
                    提交回复
                </h4>
                <hr class="col-lg-12 col-md-12 col-sm-12 col-xs-12 comment-sp">
                <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12" id="comment_section">
                    <div class="media">
                        <div class="media-left">
                            <a href="#">
                                <img class="media-object img-rounded" src="static/picture/default-avatar.png">
                            </a>
                        </div>
                        <div class="media-body">
                            <h5 class="media-heading">
                                <span>匿名用户</span>
                            </h5>
                        </div>
                    </div>
                    <input type="hidden" id="question_id" value="1282">
                    <textarea class="form-control comment" rows="6" id="comment_content"></textarea>
                    <button type="button" class="btn btn-success btn-comment" onclick="post()">回复</button>
                </div>
            </div>

        </div>

        <!--右边信息块-->
        <div class="col-lg-3 col-md-12 col-sm-12 col-xs-12">
            <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
                <h4>发起人</h4>
                <div class="media">
                    <div class="media-left">
                        <a href="#">
                            <img class="media-object img-rounded" src="static/picture/d808db057dc74918a101cfd272b8b373.png">
                        </a>
                    </div>
                    <div class="media-body">
                        <h5 class="media-heading">
                            <span>小匠</span>
                        </h5>
                    </div>
                </div>
            </div>
            <div><div>
    <!--码问官方公众号-->
    <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12 side">
        <h4>官方微信</h4>
        <img class="img-thumbnail question-wechat" src="static/picture/official-account.png">
    </div>
</div></div>
            <div><div>
    <hr class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
    <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12 side">
        <a href="javascript:;" onclick="clickSide(&quot;UCloud&quot;)" target="_blank">
            <img class="img-thumbnail question-wechat" src="static/picture/uhost.png">
        </a>
    </div>

</div>
            </div>
            <!--相关问题-->
            <hr class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
            <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
                <h4>相关问题</h4>
                <ul class="question-related">
                    <li>
                        <a href="340726.html">1</a>
                    </li>
                    <li>
                        <a href="340724.html">这是一个测试</a>
                    </li>
                    <li>
                        <a href="340723.html">本地运行报错 空指针异常</a>
                    </li>
                    <li>
                        <a href="1464.html">没有后退, 返回首页, 标签列表什么的吗</a>
                    </li>
                    <li>
                        <a href="javascript:;">P2 网页报错</a>
                    </li>
                    <li>
                        <a href="javascript:;">提供的标题1</a>
                    </li>
                    <li>
                        <a href="javascript:;">提问的标题</a>
                    </li>
                    <li>
                        <a href="javascript:;">Cookies must be enabled to use GitHub.</a>
                    </li>
                    <li>
                        <a href="javascript:;">这个开源项目怎么样</a>
                    </li>
                    <li>
                        <a href="1457.html">测试开源测试开源</a>
                    </li>
                    <li>
                        <a href="1455.html">emmm</a>
                    </li>
                    <li>
                        <a href="1454.html">关于该项目</a>
                    </li>
                    <li>
                        <a href="javascript:;">项目本地启动，h2数据库驱动找不到</a>
                    </li>
                    <li>
                        <a href="1451.html">测试发个问题</a>
                    </li>
                    <li>
                        <a href="1449.html">test photo upload again</a>
                    </li>
                    <li>
                        <a href="1448.html">test photo upload</a>
                    </li>
                    <li>
                        <a href="javascript:;">test again</a>
                    </li>
                    <li>
                        <a href="1445.html">杨浪杨浪</a>
                    </li>
                    <li>
                        <a href="1443.html">我来测试下，哈哈哈哈哈哈</a>
                    </li>
                    <li>
                        <a href="1440.html">测试文章</a>
                    </li>
                </ul>
            </div>
        </div>
    </div>
</div>
<div><div class="footer">
    <div>Copyright © 2021 <a href="javascript:;">浙ICP备18020649号</a> · 服务器赞助: <a href="javascript:;">UCloud</a> · All Rights Reserved Powered By <a href="index.html" target="_blank"> 码问社区 </a></div>
</div></div>
</body>
<script>
    function getUrlParam(variable) {
        var query = window.location.search.substring(1);
        var vars = query.split("&");
        for(var i = 0; i < vars.length; i++) {
            var pair = vars[i].split("=");
            if(pair[0] == variable) { return pair[1]; }
        }
        return(false);
    }
    $(function(){
        /*
         *	获取地址栏参数(截取,分割),修改功能需要
         */
        var id=getUrlParam("id");
        $.ajax({
            "url":"/topic/dd",
            "type":"get",
            "data":{"id":id},
            "dataType":"json",
            "success":function(a){
                $("#dianzansum").text(a);
            },
            "error":function(){
                alert("服务器错误");
            }
        })

        var id=getUrlParam("id");
        $.ajax({
            "url":"/topic/datailsindex",
            "type":"get",
            "data":{"id":id},
            "dataType":"json",
            "success":function(a){

                var html = "";
                //标题
                $("#title").text(a[0].title);
                //标题
                $("#title1").text(a[0].title);
                //作者
                $("#topicUser").text(a[0].topicUser)
                $("#topicTime").text(a[0].topicTime)
                //阅读数
                $("#browseCount").text(a[0].browseCount)
                $("#question-view").text(a[0].content)
                $("#biaoqian").text(a[0].topicTag)

                // $('#caidan').append(html);

            },
            "error":function(){
                alert("服务器错误");
            }
        })

    });
    function dianzan(){
        //文章id
        var id=getUrlParam("id");
        $.ajax({
            "url":"/topic/detailsDianzan",
            "type":"get",
            "data":{"id":id},
            "dataType":"json",
            "success":function(a){
                var num = a.result["num"];
                var sum = a.result["sum"];

                $("#dianzansum").text(sum);

                if(num==1){
                    alert("点赞成功")
                }else{
                    alert("点赞取消")
                }
            },
            "error":function(){
                alert("服务器错误");
            }
        })
    }
    // var user = a.result["user"];
    // for{
    //     //获取集合
    //     user[i].name
    // }
</script>
</html>